Python on Windows
Python with Cocosplate on Windows
If Python was installed on your system during setup, the path of the latest Python installation is detected automatically and a path to the jni library of Java Embedded Python is set for startup.
We do not want to modify your Python installation therefore you need install JEP manually.
Cocosplate needs it for the Python Script node to function properly. Since it runs as a windows service it currently cannot use a Python installation of the current user out of the box.
Administrator privileges and an existing Java JDK are required to successfully install Python for use with Cocosplate . on Windows.
In the Python Setup, choose 'Customize installation' and enable the 'Install for all users' checkbox.
After that, JEP needs to be installed (ensure your PATH variable points to the global Python installation,
e.g. c:\Program Files\Python313
if you previously installed Python to another place).
Open an administrator command-line prompt
- Verify that your JAVA_HOME environment variable or set it to your JDK location, e.g.
C:\Program Files\Eclipse Adoptium\jdk-21.0.3.9-hotspot
- Update and install pip and python setuptools which jep requires
- Install JEP
set JAVA_HOME="C:\Program Files\Eclipse Adoptium\jdk-21.0.3.9-hotspot"
pip install -U pip setuptools
pip install --no-cache-dir --no-build-isolation jep
This installs it to the Python installation that Cocosplate refers to in the library path.
Advanced
If you did the above after you have installed Cocosplate,
you need to adjust the library path, navigate to Program Files\Cocosplate AI
and edit cocosplate-ai.l4j.ini
you
need administrative privileges to open it with write permissions.
Change the paths line, e.g. to c:\Progra~1\Python~1\Lib\site-packages\jep
. The short DOS path format is needed due to
whitespace restrictions in the l4j.ini-file unfortunately - it is usually done automatically for you.
-Djava.library.path=C:\PROGRA~1\PYTHON~1\
-Djep.library.path=C:\PROGRA~1\COCOSP~1\jep\jep.dll
-Djep.python.home=C:\PROGRA~1\PYTHON~1\
You can also just restart Cocosplate Setup and recreate the file with it.
Security
The described Windows Setup is intended to be used for creation of workflows in a local environment. It should not be
exposed to public internet since Python has extended privileges (LocalSystem
) in that type of installation.